<template>
	<view>
		<view class="navbar" :style="[{ backgroundColor: bgcolor },{ color: txcolor }]">
			<view :style="{ height: sysHeight + 'px' }"></view>
			<view class="navbarH acea-row row-middle row-between">
				<view class="iconfont icon-xiangzuo1" :style="{ color: txcolor }" @click="back"></view>
				<view class="title" :style="{ color: txcolor }">{{ title }}</view>
				<view class="zhan"></view>
			</view>
		</view>
		<view :style="{ height: (sysHeight+48) + 'px' }"></view>
	</view>
</template>

<script>
	let sysHeight = uni.getSystemInfoSync().statusBarHeight;
	export default {
		props:{
			title:{
				type: String,
				default:'',
			},
			bgcolor:{
				type: String,
				default:'#ffffff'
			},
			txcolor:{
				type: String,
				default:'#000000'
			}
		},
		data() {
			return {
				sysHeight: sysHeight,
				
			};
		},
		methods:{
			back(){
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss">
	.navbar{
		width: 100%;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		// background-color: #ffffff;
		z-index: 999;
		
		.navbarH{
			width: 100%;
			height: 100rpx;
			padding: 0 30rpx;
		}
		.icon-xiangzuo1{
			color: #222222;
			font-size: 40rpx;
			font-weight: bold;
		}
		.title{
			color: #222222;
			font-size: 34rpx;
		}
		.zhan{
			width: 50rpx;
			height: 50rpx;
		}
		
		
	}
</style>
